<template>
  <div id="app" class="app">
    <router-view />
    <div class="loading" v-if="loading">
      <van-loading size="30px" vertical color="#0094ff">加载中...</van-loading>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {}
  },
  computed: {
    loading() {
      return this.$store.state.loading;
    },
  },
};
</script>

<style lang="scss">
.app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  min-height: 100vh;
  background-color: #f3f5f7;
}
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background-color: rgba(255, 255, 255, 0.85);
}
</style>
